<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Untitled Document</title>

<link href='saler.css' rel="stylesheet" type="text/css"/>	
<link href="../css/default.css" rel="stylesheet" type="text/css"/>	

</head>

<?php 
require_once("..\\common.php");
$admin = false; 
CheckSalerLogon();
?>

<?php 
$clientid = $_GET["clientid"];

$DB = DBConnect();
$query = "SELECT type,name,submit_time,fund,demand,charact,devspeed,othersalers,deal_time,deal_money, addict_dev, suppose_saler,product,remark,contact FROM client WHERE id = $clientid ";
$result = mysql_query($query,$DB);

if($myrow = mysql_fetch_row($result) )
{
	$type = $myrow[0];
	if($type==0)$type="一般客户";
	else if($type==1)$type="意向客户";
	else if($type==2)$type="成交客户";
	
	$name = $myrow[1];
	$submit_time = $myrow[2];	
	$fund= $myrow[3];
	$demand = ClientNeedList::getItem($myrow[4]);
	$charact = ClientCharaList::getItem($myrow[5]);
	$devspeed = ClientDevSpdList::getItem($myrow[6]);
	$othersalers = $myrow[7];
	$deal_time = $myrow[8];
	$deal_money = $myrow[9];
	$addictd_dev = ($myrow[10]==0)?"否":"是";
	$suppose_saler = $myrow[11];
	$product = $myrow[12];
	$remark = $myrow[13];
	$contact = $myrow[14];
	
	$current_day = date("Y-m-d");
	$submit_day = explode(" ",$submit_time);
	$submit_day = $submit_day[0];
	
	$leftday = 20- (strtotime($current_day) - strtotime($submit_day))/(3600*24);
	if($leftday<0)$leftday = "已回收";
}
else
{
	die("无法取得客户资料");
}

?>



<body>
<table cellspacing='1' cellpadding='1' >
  <tr>
    <td style="font-weight:bold">类型</td>
    <td><?php  echo $type;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">姓名</td>
    <td><?php  echo $name;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">联系方式</td>
    <td><?php  echo $contact;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">提交时间</td>
    <td><?php  echo $submit_time;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">回收剩余天数</td>
    <td><?php  echo $leftday;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">资金量(万元)</td>
    <td><?php  echo $fund;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">需求</td>
    <td><?php  echo $demand;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">性格</td>
    <td><?php  echo $charact;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">所需开发速度</td>
    <td><?php  echo $devspeed;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">其他开发人员</td>
    <td><?php  echo $othersalers;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">成交时间</td>
    <td><?php  echo $deal_time;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">成交金额(万)</td>
    <td><?php  echo $deal_money;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">是否还有开发潜力</td>
    <td><?php  echo $addictd_dev;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">建议谁继续开发</td>
    <td><?php  echo $suppose_saler;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">预计产品</td>
    <td><?php  echo $product;?></td>
  </tr>
  <tr>
    <td style="font-weight:bold">备注</td>
    <td><?php  echo $remark;?></td>
  </tr>
</table>



</body>
</html>